<?php

namespace app\index\controller;

class Chart
{

    public function index()
    {
        $data = [
            'user' => '用户'.rand(0,2000),
            'content' => $_POST['content'],
        ];   
        foreach($_POST['http_server']->ports[1]->connections as $fd){
            $_POST['http_server']->push($fd,json_encode($data));
        }
    }

}